package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcUserPublicRole;
import com.visizen.wisdomclass.server.model.WcUserPublicRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcUserPublicRoleMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcUserPublicRoleSqlProvider.class, method="countByExample")
    int countByExample(WcUserPublicRoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcUserPublicRoleSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcUserPublicRoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_user_public_role",
        "where publicrole_id = #{publicrole_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long publicrole_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_user_public_role (publicrole_id, user_id, ",
        "role_id, score)",
        "values (#{publicrole_id,jdbcType=BIGINT}, #{user_id,jdbcType=BIGINT}, ",
        "#{role_id,jdbcType=BIGINT}, #{score,jdbcType=INTEGER})"
    })
    int insert(WcUserPublicRole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcUserPublicRoleSqlProvider.class, method="insertSelective")
    int insertSelective(WcUserPublicRole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcUserPublicRoleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="publicrole_id", property="publicrole_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="role_id", property="role_id", jdbcType=JdbcType.BIGINT),
        @Result(column="score", property="score", jdbcType=JdbcType.INTEGER)
    })
    List<WcUserPublicRole> selectByExample(WcUserPublicRoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "publicrole_id, user_id, role_id, score",
        "from wc_user_public_role",
        "where publicrole_id = #{publicrole_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="publicrole_id", property="publicrole_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="role_id", property="role_id", jdbcType=JdbcType.BIGINT),
        @Result(column="score", property="score", jdbcType=JdbcType.INTEGER)
    })
    WcUserPublicRole selectByPrimaryKey(Long publicrole_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcUserPublicRoleSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcUserPublicRole record, @Param("example") WcUserPublicRoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcUserPublicRoleSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcUserPublicRole record, @Param("example") WcUserPublicRoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcUserPublicRoleSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcUserPublicRole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_user_public_role
     *
     * @mbggenerated
     */
    @Update({
        "update wc_user_public_role",
        "set user_id = #{user_id,jdbcType=BIGINT},",
          "role_id = #{role_id,jdbcType=BIGINT},",
          "score = #{score,jdbcType=INTEGER}",
        "where publicrole_id = #{publicrole_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcUserPublicRole record);
}